"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GeoServerRestClient = exports.GeoServerResponseError = void 0;
const layer_1 = __importDefault(require("./src/layer"));
const style_1 = __importDefault(require("./src/style"));
const workspace_1 = __importDefault(require("./src/workspace"));
const datastore_1 = __importDefault(require("./src/datastore"));
const imagemosaic_1 = __importDefault(require("./src/imagemosaic"));
const security_1 = __importDefault(require("./src/security"));
const settings_1 = __importDefault(require("./src/settings"));
const namespace_1 = __importDefault(require("./src/namespace"));
const about_1 = __importDefault(require("./src/about"));
const reset_reload_1 = __importDefault(require("./src/reset-reload"));
const layergroup_1 = __importDefault(require("./src/layergroup"));
var geoserver_1 = require("./src/util/geoserver");
Object.defineProperty(exports, "GeoServerResponseError", { enumerable: true, get: function () { return geoserver_1.GeoServerResponseError; } });
class GeoServerRestClient {
    url;
    user;
    password;
    constructor(url, user, password) {
        this.url = url;
        this.user = user;
        this.password = password;
        this.url = this.url.endsWith('/') ? this.url : this.url + '/';
        this.auth = 'Basic ' + Buffer.from(this.user + ':' + this.password).toString('base64');
        this.layers = new layer_1.default(this.url, this.auth);
        this.layergroups = new layergroup_1.default(this.url, this.auth);
        this.styles = new style_1.default(this.url, this.auth);
        this.workspaces = new workspace_1.default(this.url, this.auth);
        this.namespaces = new namespace_1.default(this.url, this.auth);
        this.datastores = new datastore_1.default(this.url, this.auth);
        this.imagemosaics = new imagemosaic_1.default(this.url, this.auth);
        this.security = new security_1.default(this.url, this.auth);
        this.settings = new settings_1.default(this.url, this.auth);
        this.about = new about_1.default(this.url, this.auth);
        this.resetReload = new reset_reload_1.default(this.url, this.auth);
    }
    auth;
    layers;
    layergroups;
    styles;
    workspaces;
    namespaces;
    datastores;
    imagemosaics;
    security;
    settings;
    about;
    resetReload;
}
exports.GeoServerRestClient = GeoServerRestClient;
